//
//  PoisonGameModel.swift
//  Game
//
//  Created by woniu on 2025/9/25.
//

import Foundation
import UIKit

class PoisonGameModel: NSObject {
    // 毒药单词
    var poisonWords: Set<String> = []
    
    // 游戏是否已开始
    var gameStarted: Bool = false
    
    // 重置游戏
    func reset() {
        poisonWords.removeAll()
        gameStarted = false
    }
    
    // 设置毒药单词
    func setPoisonWords(_ words: Set<String>) {
        poisonWords = words
        gameStarted = true
    }
    
    // 检查单词是否为毒药单词
    func isPoisonWord(_ word: String) -> Bool {
        return poisonWords.contains(word)
    }
}